Skip to content

docs: add how-to guide for configuring a third-party agent - #45559

Merged
pelikhan merged 2 commits into
mainfrom
copilot/add-gentek-engine-docs
Jul 14, 2026
Merged

docs: add how-to guide for configuring a third-party agent#45559
pelikhan merged 2 commits into
mainfrom
copilot/add-gentek-engine-docs

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

gh-aw has no documentation explaining how a third-party CLI coding agent (one not built into the binary) can be integrated via the engine.behaviors import mechanism.

Changes

  • docs/src/content/docs/guides/third-party-agent.md — new how-to guide using Gentek as a concrete open-source example:

    • Explains the engine.behaviors import pattern: third-party agents publish an engine definition .md file; importing it registers the engine at compile time with no binary changes
    • Shows a complete Gentek engine definition file (npm install, config-file generation, headless execution, MCP wiring)
    • Covers workflow import syntax, network allowlist, secret setup, version pinning via engine.version, and recompile reminder
  • docs/astro.config.mjs — adds "Third-Party Agent" to the Guides sidebar

Example: workflow using an imported third-party engine

on: issues

engine: gentek

imports:
  - gentekai/gentek/.github/workflows/gentek-engine.md@v1.0.0

network:
  allowed:
    - defaults
    - api.openai.com

---

Triage this issue and apply an appropriate label.

…ample)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot use opencode as example. See smoke-opencode

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot use opencode as example. See smoke-opencode

Done. Replaced Gentek with OpenCode throughout the guide — using the actual engine definition from pkg/workflow/data/engines/opencode.md as the example, the sst/opencode import path, ANTHROPIC_API_KEY for secrets, and api.anthropic.com in the network allowlist (with a note on swapping it for other providers). Commit: docs: use opencode as example in third-party agent guide.

@pelikhan
pelikhan marked this pull request as ready for review July 14, 2026 22:25
Copilot AI review requested due to automatic review settings July 14, 2026 22:25
@pelikhan
pelikhan merged commit 73c6fe5 into main Jul 14, 2026
@pelikhan
pelikhan deleted the copilot/add-gentek-engine-docs branch July 14, 2026 22:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a how-to guide for importing third-party agent definitions into gh-aw.

Changes:

  • Documents engine definitions, credentials, networking, and version pinning.
  • Adds the guide to the documentation sidebar.
Show a summary per file
File Description
docs/src/content/docs/guides/third-party-agent.md Adds the third-party agent guide and examples.
docs/astro.config.mjs Adds sidebar navigation.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 9
  • Review effort level: Medium

order: 330
---

Third-party coding agent CLIs that are not built into gh-aw can integrate through a declarative engine definition file that the agent publisher distributes. This guide uses [OpenCode](https://opencode.ai) as a concrete open-source example.
```aw wrap
on: issues

engine: opencode
engine: opencode

imports:
- sst/opencode/.github/workflows/opencode-engine.md@v1.2.14
Comment on lines +100 to +107
network:
allowed:
- defaults
- api.anthropic.com

---

Triage this issue and apply an appropriate label.
1. Go to **Settings → Secrets and variables → Actions**.
2. Create a new secret named `ANTHROPIC_API_KEY` with the value from your Anthropic account.

For other providers, set the corresponding key (for example `OPENAI_API_KEY` for OpenAI models) and reference it in your workflow's `engine.env` block.
Comment on lines +128 to +130
engine:
id: opencode
version: "1.3.0"
version: "1.3.0"

imports:
- sst/opencode/.github/workflows/opencode-engine.md@v1.2.14

## Example: OpenCode

OpenCode is an open-source, provider-agnostic AI coding agent (BYOK — Bring Your Own Key) that supports 75+ models from Anthropic, OpenAI, Google, Groq, and others via a unified CLI interface.

## Add the API key secret

OpenCode reads provider credentials from environment variables. For the default Anthropic provider, add `ANTHROPIC_API_KEY` to your repository or organization:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants